package com.ruge.system.pojo.entity;

import com.ruge.common.model.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

/**
 * 创建人 ：爱丽丝、如歌
 * 创建时间 ：2020-03-04  18:54
 * 描述 ：用户 角色 中间表
 * @author Administrator
 */
@Getter
@Setter
@Entity
@ApiModel(value="菜单实体类")
public class SysRoleMenu extends BaseEntity {
    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "sys_menu_id")
    @ApiModelProperty(example="sys_menu_id")
    private SysMenu sysMenu;

    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "sys_role_id")
    @ApiModelProperty(example="sys_role_id")
    private SysRole sysRole;
}
